<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta property="og:title" content="The Trove"/> 
	<meta property="og:type" content="website"/> 
	<meta property="og:image" content="<?php echo base_url('resources/Logo.gif'); ?>"/> 
	<meta property="og:url" content="<?php echo base_url(); ?>"/> 
	<meta property="og:site_name" content="The Trove"/> 

	<?php
		if(isset($title) && $title != ''){
			echo "<title>$title</title>";
		}
		else{
			echo "<title>The Trove</title>";
		}

		if(isset($include_top_bar) && $include_top_bar == TRUE){
			echo link_tag(base_url() . "stylesheets/top_bottom_bars.css");
			echo link_tag(base_url() . "stylesheets/menu.css");
		}
		echo link_tag(base_url() . "stylesheets/common.css");
		
		
		if (isset($stylesheets)){
			foreach ($stylesheets as $css){
				echo link_tag(base_url() . "stylesheets/$css.css");
			}
		}

	?>
</head>
<body>
<div id="fb-root"></div>

<?php
	if(isset($include_top_bar) && $include_top_bar == TRUE){
		$this->load->view('includes/top_bar');
		echo '<div id="main">';
		$this->load->view('includes/menu');
		echo '<div id="content-root">';
		if($status = $this->session->userdata('status_messages')){
			echo '<div id="status"><ul>';				
				foreach($status AS $s){
					echo '<li class="normal-text">'.$s.'</li>';
				}
			echo '</ul></div>';
			$this->session->unset_userdata('status_messages');
		}
	}
?>